package com.biaobiaoqi.scoreanalysis.administrator.action;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.biaobiaoqi.scoreanalysis.service.IClazzTypeService;
import com.opensymphony.xwork2.ActionSupport;

public class DeleteClazzType extends ActionSupport {
 	private static final long serialVersionUID = 2598291950906540291L;
 	private static final Log log = LogFactory.getLog(DeleteClazzType.class);
 	
 	private int id;
 	@Resource
 	private IClazzTypeService clazzTypeService;
 	
 	public String execute() {
		log.debug("delete clazz type:"+id);
		try {
			clazzTypeService.deleteClazzType(id);
			return SUCCESS;
		} catch (Exception e) {
			log.error("delete clazz type failed.",e);
			return ERROR;
		}
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public IClazzTypeService getClazzTypeService() {
		return clazzTypeService;
	}

	public void setClazzTypeService(IClazzTypeService clazzTypeService) {
		this.clazzTypeService = clazzTypeService;
	}
}
